﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VirtualTournaments.Services.Tournaments
{
    public class Match
    {
        private String _local;
        private String _visitor;
        private bool _played;
        private String _localGoals;
        private String _visitorGoals;

        public Match(String local, String visitor)
        {
            Local = local;
            Visitor = visitor;
            Played = false;
            LocalGoals = VisitorGoals = "0";
        }

        public Match(String local, String visitor, int localGoals, int visitorGoals)
        {
            Local = local;
            Visitor = visitor;
            Played = true;
            LocalGoals = localGoals.ToString();
            VisitorGoals = visitorGoals.ToString();
        }

        public Match(String local, String visitor, int localGoals, int visitorGoals, int localPenaltyGoals, int visitorPenaltyGoals)
        {
            Local = local;
            Visitor = visitor;
            Played = true;
            LocalGoals = localGoals.ToString() + "(" + localPenaltyGoals.ToString() + ")";
            VisitorGoals = localGoals.ToString() + "(" + localPenaltyGoals.ToString() + ")";
        }

        public String Local
        {
            get { return _local; }
            set { _local = value; }
        }

        public String Visitor
        {
            get { return _visitor; }
            set { _visitor = value; }
        }

        public bool Played
        {
            get { return _played; }
            private set { _played = value; }
        }

        public String LocalGoals
        {
            get { return _localGoals; }
            set { _localGoals = value; }
        }

        public String VisitorGoals
        {
            get { return _visitorGoals; }
            set { _visitorGoals = value; }
        }

    }
}